home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 4 / Mac Giga-ROM 4.0 - 1993.toast / FILES / EDU / M-Q / Math.cpt / Math / card_6334.txt < prev    next >
Text File  |  1990-12-18  |  4KB  |  205 lines

  1. -- card: 6334 from stack: in
  2. -- bmap block id: 6652
  3. -- flags: 0000
  4. -- background id: 2700
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   global right, wrong
  9.   put 0 into right
  10.   put right into  field numright
  11.  
  12.   put 0 into wrong
  13.   put wrong into  field numwrong
  14.   click at loc of card field result
  15. end opencard
  16.  
  17.  
  18.  
  19.  
  20.  
  21. -- part 1 (field)
  22. -- low flags: 01
  23. -- high flags: 0000
  24. -- rect: left=178 top=155 right=185 bottom=221
  25. -- title width / last selected line: 0
  26. -- icon id / first selected line: 0 / 0
  27. -- text alignment: 65535
  28. -- font id: 3
  29. -- text size: 24
  30. -- style flags: 256
  31. -- line height: 32
  32. -- part name: second
  33.  
  34.  
  35. -- part 2 (field)
  36. -- low flags: 00
  37. -- high flags: 0002
  38. -- rect: left=252 top=122 right=152 bottom=313
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 0
  42. -- font id: 3
  43. -- text size: 24
  44. -- style flags: 256
  45. -- line height: 32
  46. -- part name: result
  47. ----- HyperTalk script -----
  48.  
  49. on returnInField
  50.  
  51.   if card field first/card field second > 9 then
  52.     click at loc of card field step1
  53.   end if
  54. end returnInField
  55.  
  56.  
  57.  
  58. on enterInfield
  59.   global right,wrong
  60.  
  61.   put "" into card field step1
  62.   put "" into card field step2
  63.  
  64.   if card field result <> (card field first)/(card field second) then
  65.     put "Try again" into card field feedback
  66.     talk card field feedback ,150,150
  67.     put "" into card field result
  68.     put wrong +1 into wrong
  69.     put wrong into field numwrong
  70.   end if
  71.   if card field result = (card field first)/(card field second) then
  72.     put right +1 into right
  73.     put right into field numright
  74.     put "Right" into card field feedback
  75.     talk card field feedback,150,150
  76.     put "" into card field result
  77.     put round of random of 9 into card field second
  78.  
  79.     put (round of random of 99)*card field second  into card field first
  80.     talk card field first,150,150
  81.     talk "divided by",150,150
  82.     talk card field second,150,150
  83.  
  84.  
  85.   end if
  86.  
  87.   put "" into card field feedback
  88.   click at the loc of card field result
  89.   talk "when the answer is right, press enter",150,150
  90. end enterInfield
  91.  
  92.  
  93.  
  94. -- part 4 (field)
  95. -- low flags: 01
  96. -- high flags: 0000
  97. -- rect: left=235 top=156 right=186 bottom=292
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 0
  101. -- font id: 3
  102. -- text size: 24
  103. -- style flags: 256
  104. -- line height: 32
  105. -- part name: first
  106.  
  107.  
  108. -- part 5 (field)
  109. -- low flags: 01
  110. -- high flags: 0000
  111. -- rect: left=340 top=170 right=195 bottom=467
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 0 / 0
  114. -- text alignment: 0
  115. -- font id: 3
  116. -- text size: 18
  117. -- style flags: 256
  118. -- line height: 24
  119. -- part name: feedback
  120.  
  121.  
  122. -- part 11 (field)
  123. -- low flags: 00
  124. -- high flags: 0002
  125. -- rect: left=234 top=191 right=219 bottom=277
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 0
  129. -- font id: 3
  130. -- text size: 24
  131. -- style flags: 256
  132. -- line height: 32
  133. -- part name: step1
  134. ----- HyperTalk script -----
  135. on returnInfield
  136.   click at loc of card field step2
  137. end returnInfield
  138.  
  139.  
  140.  
  141.  
  142. -- part 12 (field)
  143. -- low flags: 00
  144. -- high flags: 0002
  145. -- rect: left=254 top=231 right=262 bottom=298
  146. -- title width / last selected line: 0
  147. -- icon id / first selected line: 0 / 0
  148. -- text alignment: 0
  149. -- font id: 3
  150. -- text size: 24
  151. -- style flags: 256
  152. -- line height: 32
  153. -- part name: step2
  154. ----- HyperTalk script -----
  155. on returnInfield
  156.   click at loc of card field result
  157. end returnInfield
  158.  
  159.  
  160.  
  161. -- part 14 (field)
  162. -- low flags: 01
  163. -- high flags: 0000
  164. -- rect: left=330 top=120 right=155 bottom=469
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 0
  168. -- font id: 3
  169. -- text size: 12
  170. -- style flags: 0
  171. -- line height: 16
  172. -- part name: 
  173.  
  174.  
  175. -- part contents for background part 6
  176. ----- text -----
  177. test
  178.  
  179. -- part contents for card part 1
  180. ----- text -----
  181. 6
  182.  
  183. -- part contents for card part 4
  184. ----- text -----
  185. 294
  186.  
  187. -- part contents for card part 9
  188. ----- text -----
  189. 0
  190.  
  191. -- part contents for card part 10
  192. ----- text -----
  193. 0
  194.  
  195. -- part contents for background part 22
  196. ----- text -----
  197. 0
  198.  
  199. -- part contents for background part 23
  200. ----- text -----
  201. 0
  202.  
  203. -- part contents for card part 14
  204. ----- text -----
  205. Type enter when the answer is right